/**
 *<p>Copyright: Copyright (c) 2012</p> 
 *<p>Company: SCPII</p>
 *<p>Project:scpii-api</p>
 *@author xiezhouyan
 *@Date 2013-4-8 下午3:38:45
 *@version 1.0
 *@description:
 */
package com.scpii.api.service.auto.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.scpii.api.common.Constants;
import com.scpii.api.domain.auto.UserCars;
import com.scpii.api.persistence.auto.UserCarsMapper;
import com.scpii.api.service.auto.UserCarsService;

@Service
public class UserCarsServiceImpl implements UserCarsService {

	@Resource
	private UserCarsMapper userCarsMapper;

	@Override
	public List<UserCars> getMaintenanceByUserId(Long userId) {
		return userCarsMapper.getUserCarsByUserIdAndCatId(userId,
				Constants.CATEGORIES.get("MAINNTENANCE_RECORD"));
	}

	@Override
	public void insertSelective(UserCars userCars) {
		userCarsMapper.insertSelective(userCars);
	}

	@Override
	public UserCars selectByPrimaryKey(String licenceId) {
		return userCarsMapper.selectByPrimaryKey(licenceId);
	}
}
